package com.qf.spring2202.annotation.dao.impl;

import com.qf.spring2202.annotation.dao.UserDao;
import com.qf.spring2202.annotation.einty.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;

@Repository
public class UserDaoImplBetter implements UserDao {

    @Value("${jdbc.url}")
    private String url;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public User getUserById(Integer id) {
        System.out.println(this.url);
        final User user = new User();
        user.setId(id);
        user.setName("lisi better");
        return user;
    }
}
